#ifndef STOCK10_H_
#define STOCK10_H_
// class declaration

#include <string>

class Stock{
    private:
        std::string company;
        long shares;
        double share_val;
        double total_val;
        void set_tot(){ total_val = share_val * shares;}
    public:
        Stock();
        Stock(const std::string & comp, long n=0, double pr=0.0);
        ~Stock();

        void buy(long n, double pr);
        void sell(long n, double pr);
        void update(double pr);
        void show() const;
        const Stock & topval(const Stock & s) const;
};

#endif